package progress.exa28_1.part2;

public class ThreadDemo {

    public static void main(String[] args) {

        //创建具体的任务对象
        Runnable printA = new PrintChar('a',100);
        Runnable printB = new PrintChar('b',100);

        //新建线程并把任务放入线程中
        Thread thread1 = new Thread(printA);
        Thread thread2 = new Thread(printB);

        thread1.start();//线程1开始运行
        thread2.start();//线程2开始运行
    }

}
